package com.hxgz.steel.dao;

import com.hxgz.steel.domain.OrderItem;
import com.hxgz.steel.dto.OrderItemTimeDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component("OrderItemMapper")
public interface OrderItemMapper {

  int deleteByPrimaryKey(Long id);

  int insert(OrderItem record);

  int insertSelective(OrderItem record);

  OrderItem selectByPrimaryKey(Long id);

  List<OrderItem> selectByOrderId(@Param("id") Long id);

  int updateByPrimaryKeySelective(OrderItem record);

  int updateByPrimaryKey(OrderItem record);

  List<OrderItem> getByOrderNoUserId(@Param("orderNo") String orderNo, @Param("userId") Long userId);

  /**
   * 此接口 请勿直接调用
   * 请调用NewOrderServiceImpl.newGetOrderItemByOrderId
   */
  List<OrderItemTimeDto> getOrderItemByOrderId(Long id);

  List<OrderItem> getOrderItem(Long id);

  /**
   * 根据订单id查询订单详情id
   * @param orderId
   * @return
   */
  OrderItem getOrderItemIDByOrderId(@Param("orderId") Long orderId);

  Integer getBySalesCountMerchantId(@Param("merchantId") Long merchantId);

  List<OrderItemTimeDto> getOrderItemAskInfoByOrderId(Long id);
}